package com.example.demo01.Entity.webEntity;

import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class AdminUser {
    //attributes
    private Integer id;
    private String userName;
    private String password;
    private Integer level;
    private String phoneNum;
    private Date createTime;
    private String jobNum;
    //constructors
    public AdminUser(){super();}

    public AdminUser(String userName, String password, Integer level, String phoneNum, String jobNum) {
        this.userName = userName;
        this.password = password;
        this.level = level;
        this.phoneNum = phoneNum;
        this.jobNum = jobNum;
    }

    public AdminUser(String userName, String password, Integer level, String phoneNum, Date createTime, String jobNum) {
        this.userName = userName;
        this.password = password;
        this.level = level;
        this.phoneNum = phoneNum;
        this.createTime = createTime;
        this.jobNum = jobNum;
    }

    public AdminUser(Integer id, String userName, String password, Integer level, String phoneNum, Date createTime, String jobNum) {
        this.id = id;
        this.userName = userName;
        this.password = password;
        this.level = level;
        this.phoneNum = phoneNum;
        this.createTime = createTime;
        this.jobNum = jobNum;
    }

    //Override
    @Override
    public String toString() {
        return "AdminUser{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", level=" + level +
                ", phoneNum='" + phoneNum + '\'' +
                ", createTime=" + createTime +
                ", jobNum='" + jobNum + '\'' +
                '}';
    }

    //setter
    public void setId(Integer id) { this.id = id; }
    public void setUserName(String userName) { this.userName = userName; }
    public void setPassword(String password) { this.password = password; }
    public void setLevel(Integer level) { this.level = level; }
    public void setPhoneNum(String phoneNum) { this.phoneNum = phoneNum; }
    public void setCreateTime(Date createTime) { this.createTime = createTime; }
    public void setJobNum(String jobNum) { this.jobNum = jobNum; }
    //getter
    public Integer getId() { return id; }
    public String getUserName() { return userName; }
    public String getPassword() { return password; }
    public Integer getLevel() { return level; }
    public String getPhoneNum() { return phoneNum; }
    public Date getCreateTime() { return createTime; }
    public String getJobNum() { return jobNum; }
}
